#include <iostream>
using namespace std;

int main() {
    for (int i = 100; i < 1000; i++) {
        int a = i % 10;
        int b = (i % 100 - a) / 10;
        int c = (i - a - b) / 100;
        if (a * a * a + b * b * b + c * c * c == i) cout << i << endl;
    }
    system("pause");
    return 0;
}